← Back to issue list

customize snapcraft environment based on architecture.

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1744608
Type
issue
State
open
Author
~bsutton
Labels
architecture environment snapcraft
Created
2018-01-21 23:30:12.255357+00:00
Updated
2018-01-22 23:21:24.887296+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

I'm doing raspberry pi development and use an environment variable to enable/disable a hardware simulator. When the snap is being deployed into a test (non-arm64) environment I need to set a number of environment variables to enable the simulator and disable the loading of the .so file (the application is java but the hardware interface is in a .so). I came across the 'on' 'else' keywords and they look perfect for this sort of problem. I want to be able to write: apps:     pi-gation:       command: tomcat-launch       daemon: simple       plugs: [network, network-bind]       environment:       on arm64:             PI4J_PLATFORM : RaspberryPi GPIO Provider        else:           PI4J_PLATFORM : Simulated           SimulatedPlatform : RaspberryPi GPIO Provider Currently the on..else keywords are only supported for the 'stage-packages' key word. on..else should be supported for setting environment variables. Possibly the concept should be considered for a number of other properties.

Evaluation history

No evaluation history available.